home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "The USA2 Program"
- ClientHeight = 6105
- ClientLeft = 480
- ClientTop = 735
- ClientWidth = 7800
- Height = 6795
- Icon = "USA2.frx":0000
- Left = 420
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 407
- ScaleMode = 3 'Pixel
- ScaleWidth = 520
- Top = 105
- Width = 7920
- Begin TegousaLibCtl.TegoUSA TegoUSA1
- Height = 5280
- Left = 0
- TabIndex = 8
- Top = 840
- Width = 7695
- _version = 65536
- _extentx = 13573
- _extenty = 9313
- _stockprops = 64
- End
- Begin VB.Label lblPopulation
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 6120
- TabIndex = 7
- Top = 360
- Width = 1575
- End
- Begin VB.Label lblYearOfStatehood
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 4560
- TabIndex = 6
- Top = 360
- Width = 1335
- End
- Begin VB.Label lblCapital
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 2520
- TabIndex = 5
- Top = 360
- Width = 1935
- End
- Begin VB.Label lblState
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 13.5
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 120
- TabIndex = 4
- Top = 360
- Width = 2295
- End
- Begin VB.Label Label4
- BackColor = &H00FFFFFF&
- Caption = "Population (in Millions)"
- Height = 255
- Left = 6120
- MousePointer = 1 'Arrow
- TabIndex = 3
- Top = 120
- Width = 1575
- End
- Begin VB.Label Label3
- BackColor = &H00FFFFFF&
- Caption = "Year of Statehood"
- Height = 255
- Left = 4560
- MousePointer = 1 'Arrow
- TabIndex = 2
- Top = 120
- Width = 1335
- End
- Begin VB.Label Label2
- BackColor = &H00FFFFFF&
- Caption = "Capital"
- Height = 255
- Left = 2520
- MousePointer = 1 'Arrow
- TabIndex = 1
- Top = 120
- Width = 495
- End
- Begin VB.Label Label1
- BackColor = &H00FFFFFF&
- Caption = "State"
- Height = 255
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 495
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuExit
- Caption = "E&xit"
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "&Help"
- Begin VB.Menu mnuAbout
- Caption = "&About..."
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- ' All variables must be declared.
- Option Explicit
- ' Declare arrays for storage of information
- ' about the 50 states.
- Dim gCapital(50) As String
- Dim gYearOfStatehood(50) As String
- Dim gPopulation(50) As String
- Private Sub Form_Load()
- ' Store information about State #0 (Border).
- gCapital(0) = ""
- gYearOfStatehood(0) = ""
- gPopulation(0) = ""
- ' Store information about State #1 (Alabama).
- gCapital(1) = "Montgomery"
- gYearOfStatehood(1) = "1819"
- gPopulation(1) = "4.0"
- ' Store information about State #2 (Alaska).
- gCapital(2) = "Juneau"
- gYearOfStatehood(2) = "1959"
- gPopulation(2) = "0.6"
- ' Store information about State #3 (Arizona).
- gCapital(3) = "Phoenix"
- gYearOfStatehood(3) = "1912"
- gPopulation(3) = "3.7"
- ' Store information about State #4 (Arkansas).
- gCapital(4) = "Little Rock"
- gYearOfStatehood(4) = "1836"
- gPopulation(4) = "2.4"
- ' Store information about State #5 (California).
- gCapital(5) = "Sacramento"
- gYearOfStatehood(5) = "1850"
- gPopulation(5) = "29.8"
- ' Store information about State #6 (Colorado).
- gCapital(6) = "Denver"
- gYearOfStatehood(6) = "1876"
- gPopulation(6) = "3.3"
- ' Store information about State #7 (Connecticut).
- gCapital(7) = "Hartford"
- gYearOfStatehood(7) = "1788"
- gPopulation(7) = "3.3"
- ' Store information about State #8 (Delaware).
- gCapital(8) = "Dover"
- gYearOfStatehood(8) = "1787"
- gPopulation(8) = "0.7"
- ' Store information about State #9 (Florida).
- gCapital(9) = "Tallahassee"
- gYearOfStatehood(9) = "1845"
- gPopulation(9) = "12.9"
- ' Store information about State #10 (Georgia).
- gCapital(10) = "Atlanta"
- gYearOfStatehood(10) = "1788"
- gPopulation(10) = "6.5"
- ' Store information about State #11 (Hawaii).
- gCapital(11) = "Honolulu"
- gYearOfStatehood(11) = "1959"
- gPopulation(11) = "1.1"
- ' Store information about State #12 (Idaho).
- gCapital(12) = "Boise"
- gYearOfStatehood(12) = "1890"
- gPopulation(12) = "1.0"
- ' Store information about State #13 (Illinois).
- gCapital(13) = "Springfield"
- gYearOfStatehood(13) = "1818"
- gPopulation(13) = "11.4"
- ' Store information about State #14 (Indiana).
- gCapital(14) = "Indianapolis"
- gYearOfStatehood(14) = "1816"
- gPopulation(14) = "5.5"
- ' Store information about State #15 (Iowa).
- gCapital(15) = "Des Moines"
- gYearOfStatehood(15) = "1846"
- gPopulation(15) = "2.8"
- ' Store information about State #16 (Kansas).
- gCapital(16) = "Topeka"
- gYearOfStatehood(16) = "1861"
- gPopulation(16) = "2.5"
- ' Store information about State #17 (Kentucky).
- gCapital(17) = "Frankfort"
- gYearOfStatehood(17) = "1792"
- gPopulation(17) = "3.7"
- ' Store information about State #18 (Louisiana).
- gCapital(18) = "Baton Rouge"
- gYearOfStatehood(18) = "1812"
- gPopulation(18) = "4.2"
- ' Store information about State #19 (Maine).
- gCapital(19) = "Augusta"
- gYearOfStatehood(19) = "1820"
- gPopulation(19) = "1.2"
- ' Store information about State #20 (Maryland).
- gCapital(20) = "Annapolis"
- gYearOfStatehood(20) = "1788"
- gPopulation(20) = "4.8"
- ' Store information about State #21 (Massachusetts).
- gCapital(21) = "Boston"
- gYearOfStatehood(21) = "1788"
- gPopulation(21) = "6.0"
- ' Store information about State #22 (Michigan).
- gCapital(22) = "Lansing"
- gYearOfStatehood(22) = "1837"
- gPopulation(22) = "9.3"
- ' Store information about State #23 (Minnesota).
- gCapital(23) = "St. Paul"
- gYearOfStatehood(23) = "1858"
- gPopulation(23) = "4.4"
- ' Store information about State #24 (Mississippi).
- gCapital(24) = "Jackson"
- gYearOfStatehood(24) = "1817"
- gPopulation(24) = "2.6"
- ' Store information about State #25 (Missouri).
- gCapital(25) = "Jefferson City"
- gYearOfStatehood(25) = "1821"
- gPopulation(25) = "5.1"
- ' Store information about State #26 (Montana).
- gCapital(26) = "Helena"
- gYearOfStatehood(26) = "1889"
- gPopulation(26) = "0.8"
- ' Store information about State #27 (Nebraska).
- gCapital(27) = "Lincoln"
- gYearOfStatehood(27) = "1867"
- gPopulation(27) = "1.6"
- ' Store information about State #28 (Nevada).
- gCapital(28) = "Carson City"
- gYearOfStatehood(28) = "1864"
- gPopulation(28) = "1.2"
- ' Store information about State #29 (New Hampshire).
- gCapital(29) = "Concord"
- gYearOfStatehood(29) = "1788"
- gPopulation(29) = "1.1"
- ' Store information about State #30 (New Jersey).
- gCapital(30) = "Trenton"
- gYearOfStatehood(30) = "1787"
- gPopulation(30) = "7.7"
- ' Store information about State #31 (New Mexico).
- gCapital(31) = "Santa Fe"
- gYearOfStatehood(31) = "1912"
- gPopulation(31) = "1.5"
- ' Store information about State #32 (New York).
- gCapital(32) = "Albany"
- gYearOfStatehood(32) = "1788"
- gPopulation(32) = "18.0"
- ' Store information about State #33 (North Carolina).
- gCapital(33) = "Raleigh"
- gYearOfStatehood(33) = "1789"
- gPopulation(33) = "6.6"
- ' Store information about State #34 (North Dakota).
- gCapital(34) = "Bismarck"
- gYearOfStatehood(34) = "1889"
- gPopulation(34) = "0.6"
- ' Store information about State #35 (Ohio).
- gCapital(35) = "Columbus"
- gYearOfStatehood(35) = "1803"
- gPopulation(35) = "10.8"
- ' Store information about State #36 (Oklahoma).
- gCapital(36) = "Oklahoma City"
- gYearOfStatehood(36) = "1907"
- gPopulation(36) = "3.15"
- ' Store information about State #37 (Oregon).
- gCapital(37) = "Salem"
- gYearOfStatehood(37) = "1859"
- gPopulation(37) = "2.8"
- ' Store information about State #38 (Pennsylvania).
- gCapital(38) = "Harrisburg"
- gYearOfStatehood(38) = "1787"
- gPopulation(38) = "11.9"
- ' Store information about State #39 (Rhode Island).
- gCapital(39) = "Providence"
- gYearOfStatehood(39) = "1790"
- gPopulation(39) = "1.0"
- ' Store information about State #40 (South Carolina).
- gCapital(40) = "Columbia"
- gYearOfStatehood(40) = "1788"
- gPopulation(40) = "3.5"
- ' Store information about State #41 (South Dakota).
- gCapital(41) = "Pierre"
- gYearOfStatehood(41) = "1889"
- gPopulation(41) = "0.7"
- ' Store information about State #42 (Tennessee).
- gCapital(42) = "Nashville"
- gYearOfStatehood(42) = "1796"
- gPopulation(42) = "4.9"
- ' Store information about State #43 (Texas).
- gCapital(43) = "Austin"
- gYearOfStatehood(43) = "1845"
- gPopulation(43) = "17.0"
- ' Store information about State #44 (Utah).
- gCapital(44) = "Salt Lake City"
- gYearOfStatehood(44) = "1896"
- gPopulation(44) = "1.7"
- ' Store information about State #45 (Vermont).
- gCapital(45) = "Montpelier"
- gYearOfStatehood(45) = "1791"
- gPopulation(45) = "0.6"
- ' Store information about State #46 (Virginia).
- gCapital(46) = "Richmond"
- gYearOfStatehood(46) = "1788"
- gPopulation(46) = "6.2"
- ' Store information about State #47 (Washington).
- gCapital(47) = "Olympia"
- gYearOfStatehood(47) = "1889"
- gPopulation(47) = "4.9"
- ' Store information about State #48 (West Virginia).
- gCapital(48) = "Charleston"
- gYearOfStatehood(48) = "1863"
- gPopulation(48) = "1.8"
- ' Store information about State #49 (Wisconsin).
- gCapital(49) = "Madison"
- gYearOfStatehood(49) = "1848"
- gPopulation(49) = "4.9"
- ' Store information about State #50 (Wyoming).
- gCapital(50) = "Cheyenne"
- gYearOfStatehood(50) = "1890"
- gPopulation(50) = "0.5"
- End Sub
- Private Sub mnuAbout_Click()
- Dim Title
- Dim Msg
- Dim CR
- CR = Chr(13) + Chr(10)
- ' The title of the About message box.
- Title = "About the USA Program"
- ' Prepare the message of the About message box.
- Msg = "This program was written with Visual "
- Msg = Msg + "Basic for Windows, using the "
- Msg = Msg + "TegoSoft USA Map OCX control. "
- Msg = Msg + CR + CR
- Msg = Msg + "The TegoSoft USA Map OCX control "
- Msg = Msg + "is part of the TegoSoft OCX Control "
- Msg = Msg + "Kit - a collection of various OCX controls. "
- Msg = Msg + CR + CR
- Msg = Msg + "For more information about the "
- Msg = Msg + "TegoSoft OCX Control Kit, contact TegoSoft "
- Msg = Msg + "at:"
- Msg = Msg + CR + CR
- Msg = Msg + "TegoSoft Inc." + CR
- Msg = Msg + "P.O. Box 389" + CR
- Msg = Msg + "Bellmore, NY 11710"
- Msg = Msg + CR + CR
- Msg = Msg + "Phone: (516)783-4824"
- ' Display the About message box.
- MsgBox Msg, vbInformation, Title
- End Sub
- Private Sub mnuExit_Click()
- ' Terminate the program.
- Unload Me
- End Sub
- Private Sub TegoUSA1_ClickMap(ByVal StateId As Integer)
- Dim Msg
- Dim Title
- Dim CR
- CR = Chr(13) + Chr(10)
- ' If the user did not click inside a state,
- ' terminate this procedure.
- If StateId = 0 Then Exit Sub
- ' Prepare the title of the message box.
- Title = "The USA2 Program"
- ' Prepare the message of the message box.
- Msg = "State: " + TegoUSA1.GetStateName(StateId)
- Msg = Msg + CR
- Msg = Msg + "Capital: " + gCapital(StateId)
- Msg = Msg + CR
- Msg = Msg + "Year of Statehood: " + gYearOfStatehood(StateId)
- Msg = Msg + CR
- Msg = Msg + "Population (in Millions): " + gPopulation(StateId)
- ' Display the message box.
- MsgBox Msg, vbOKOnly + vbInformation, Title
- End Sub
- Private Sub TegoUSA1_MouseMoveOnMap(ByVal StateId As Integer, ByVal x As Integer, ByVal y As Integer, ByVal Button As Integer)
- ' Update the lblState, lblCapital, lblYearOfStatehood,
- ' and lblPopulation labels.
- lblState = TegoUSA1.GetStateName(StateId)
- lblCapital = gCapital(StateId)
- lblYearOfStatehood = gYearOfStatehood(StateId)
- lblPopulation = gPopulation(StateId)
- End Sub
-